//#include<bits/stdc++.h>
#include "iostream"
using namespace std;
int mm, nn; //  times size
int x,y,r,z;
int xx[8] ={1,1,0,-1,-1,-1,0,1};
int yy[8] ={0,-1,-1,-1,0,1,1,1};
//int sq[100][100];
void sply(int sq[][]){
	for(int i=1;i<=8;i++){
		
	sq[x+xx[i]][y+yy[i]] = sq[x+xx[i]+1][y+yy[i]+1];  	
	}
	
	
}
int main() 
{

	
	cin  >> nn>> mm;
	int sq[mm+1][mm+1];
	//		cin >> sq[i][0]>>sq[i][1]>>sq[i][2]>>sq[i][3];
	int *p =  sq[0]; // 指针赋值
	for(int i=1;i<=  nn*nn;i++){
		*(p++) = i ; 
	}
	for(int i=1;i<=mm;i++){
		cin>>x>>y>>r>>z;
		sply(sq);
	}
	cout<<'a';
	return 0;
}
